package com.example.zluserservice.dto.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @Author zhenliu（孙凌岳）
 * @Description AI生成 - 操作日志响应DTO
 * @Date 2025/6/20 16:46
 * @Version 1.0
 */
@Data
@ApiModel(description = "操作日志响应DTO")
public class OperationLogResDTO {
    @ApiModelProperty(value = "日志主键", example = "10001")
    private Long operId;

    @ApiModelProperty(value = "操作用户ID", example = "123456")
    private Long userId;

    @ApiModelProperty(value = "用户名", example = "zhangsan")
    private String username;

    @ApiModelProperty(value = "操作行为（如 update_user）", example = "update_user")
    private String action;

    @ApiModelProperty(value = "请求URL", example = "/api/user/update")
    private String url;

    @ApiModelProperty(value = "请求IP地址", example = "192.168.1.1")
    private String ip;

    @ApiModelProperty(value = "操作详情（如修改字段内容）", example = "修改了用户邮箱")
    private String detail;

    @ApiModelProperty(value = "操作状态（0成功，1失败）", example = "0")
    private Integer status;

    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    @ApiModelProperty(value = "操作时间，格式：yyyy-MM-dd'T'HH:mm:ss", example = "2025-06-20T15:30:00")
    private LocalDateTime operTime; // 操作时间
}